Part Number Hot Search : 
A3965LB 200AB L2101 FDP120AN TFS156 A6474 SW660 LB11867
Product Description
Full Text Search
 

To Download M68040 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ?otorola inc., 1990 revised 1992, 1993 M68040 user? manual including the mc68040, mc68040v, mc68lc040, mc68ec040, and mc68ec040v motorola f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
?motorola inc., 1992 motorola reserves the right to make changes without further notice to any products herein to improve reliability, function or design. motorola does not assume any liability arising out of the application or use of any product or circuit described herein; neither does it convey any license under its patent rights nor the rights of others. motorola products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the motorola product could create a situation where personal injury or death may occur. should buyer purchase or use motorola products for any such unintended or unauthorized application, buyer shall indemnify and hold motorola and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that motorola was negligent regarding the design or manufacture of the part. motorola and the are registered trademarks of motorola, inc. motorola, inc. is an equal opportunity/affirmative action employer. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
iv M68040 user? manual motorola preface the complete documentation package for the mc68040, mc68040v, mc68lc040, mc68ec040, and mc68ec040v (collectively called M68040) consists of the M68040um/ad, M68040 user? manual , and the m68000pm/ad, m68000 family programmer? reference manual . the M68040 user? manual describes the capabilities, operation, and programming of the M68040 32-bit third-generation microprocessors. the m68000 family programmer? reference manual contains the complete instruction set for the m68000 family. the introduction of this manual includes general information concerning the mc68040 and summarizes the differences between the M68040 member devices. additionally, three appendices provide detailed information on how these M68040 dirivatives operate differently from the mc68040. for detailed information on one of these M68040 dirivatives, use the following table to determine which appendices to read in conjunction with the rest of this manual. device number appendices mc68040v appendix a mc68lc040 and appendix c mc68040v and mc68ec040v mc68lc040 appendix a mc68lc040 mc68ec040 appendix b mc68ec040 mc68ec040v appendix b mc68ec040 and appendix c mc68040v and mc68ec040v when reading this manual, remember to disregard information concerning floating-point in reference to the mc68040v and mc68lc040, and to disregard information concerning floating-point and memory management in reference to the mc68ec040 and mc68ec040v. the organization of this manual is as follows: section 1 introduction section 2 integer unit section 3 memory management unit (except mc68ec040 and mc68ec040v) section 4 instruction and data caches section 5 signal description section 6 ieee 1149.1 test access port (jtag) section 7 bus operation section 8 exception processing section 9 floating-point unit (mc68040) section 10 instruction timings section 11 mc68040 electrical and thermal characteristics section 12 ordering information and mechanical data appendix a mc68lc040 appendix b mc68ec040 appendix c mc68040v and mc68ec040v appendix d m68000 family summary appendix e floating-point emulation (M68040fpsp) index f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
vi M68040 user? manual motorola table of contents paragraph page number title number section 1 introduction 1.1 differences ............................................................................................ 1-1 1.1.1 mc68040v and mc68lc040 ............................................................ 1-1 1.1.2 mc68ec040 and mc68ec040v ....................................................... 1-2 1.2 features ................................................................................................ 1-3 1.3 extensions to the m68000 family ......................................................... 1-3 1.4 functional blocks .................................................................................. 1-3 1.5 processing states ................................................................................. 1-5 1.6 programming model .............................................................................. 1-5 1.7 data format summary.......................................................................... 1-9 1.8 addressing capabilities summary ........................................................ 1-9 1.9 notational conventions ......................................................................... 1-11 1.10 instruction set overview ....................................................................... 1-13 section 2 integer unit 2.1 integer unit pipeline.............................................................................. 2-1 2.2 integer unit register description .......................................................... 2-4 2.2.1 integer unit user programming model .............................................. 2-4 2.2.1.1 data registers (d7?0) ................................................................ 2-4 2.2.1.2 address registers (a6?0) ........................................................... 2-4 2.2.1.3 system stack pointer (a7) ............................................................. 2-5 2.2.1.4 program counter ........................................................................... 2-5 2.2.1.5 condition code register ................................................................ 2-5 2.2.2 integer unit supervisor programming model .................................... 2-5 2.2.2.1 interrupt and master stack pointers .............................................. 2-6 2.2.2.2 status register .............................................................................. 2-7 2.2.2.3 vector base register ..................................................................... 2-7 2.2.2.4 alternate function code registers ................................................ 2-7 2.2.2.5 cache control register ................................................................. 2-8 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola M68040 user? manual vii table of contents (continued) paragraph page number title number section 3 memory management unit (except mc68ec040 and mc68ec040v) 3.1 memory management programming model .......................................... 3-3 3.1.1 user and supervisor root pointer registers................................ ..... 3-3 3.1.2 translation control register .............................................................. 3-4 3.1.3 transparent translation registers .................................................... 3-5 3.1.4 mmu status register ........................................................................ 3-6 3.2 logical address translation .................................................................. 3-7 3.2.1 translation tables ............................................................................. 3-7 3.2.2 descriptors ........................................................................................ 3-12 3.2.2.1 table descriptors ........................................................................... 3-12 3.2.2.2 page descriptors ........................................................................... 3-13 3.2.2.3 descriptor field definitions ............................................................ 3-13 3.2.3 translation table example ................................................................ 3-16 3.2.4 variations in translation table structure .......................................... 3-16 3.2.4.1 indirect action ................................................................................ 3-16 3.2.4.2 table sharing between tasks ....................................................... 3-18 3.2.4.3 table paging .................................................................................. 3-19 3.2.4.4 dynamically allocated tables ........................................................ 3-21 3.2.5 table search accesses ..................................................................... 3-21 3.2.6 address translation protection ......................................................... 3-23 3.2.6.1 supervisor and user translation tables........................................ 3-23 3.2.6.2 supervisor only.............................................................................. 3-23 3.2.6.3 write protect .................................................................................. 3-24 3.3 address translation caches ................................................................. 3-26 3.4 transparent translation ........................................................................ 3-29 3.5 address translation summary .............................................................. 3-30 3.6 mmu effect on rsti and mdis ............................................................. 3-31 3.6.1 effect of rsti on the mmus .............................................................. 3-31 3.6.2 effect of mdis on address translation .............................................. 3-31 3.7 mmu instructions .................................................................................. 3-33 3.7.1 movec ............................................................................................. 3-33 3.7.2 pflush............................................................................................. 3-33 3.7.3 ptest ............................................................................................... 3-33 3.7.4 register programming considerations.............................................. 3-34 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
viii M68040 user? manual motorola table of contents (continued) paragraph page number title number section 4 instruction and data caches 4.1 cache operation ................................................................................... 4-2 4.2 cache management.............................................................................. 4-5 4.3 caching modes ..................................................................................... 4-6 4.3.1 cachable accesses ........................................................................... 4-6 4.3.1.1 write-through mode ...................................................................... 4-6 4.3.1.2 copyback mode ............................................................................. 4-6 4.3.2 cache-inhibited accesses ................................................................. 4-7 4.3.3 special accesses .............................................................................. 4-7 4.4 cache protocol ..................................................................................... 4-7 4.4.1 read miss ......................................................................................... 4-8 4.4.2 write miss .......................................................................................... 4-8 4.4.3 read hit ............................................................................................ 4-8 4.4.4 write hit ............................................................................................. 4-8 4.5 cache coherency ................................................................................. 4-9 4.6 memory accesses for cache maintenance........................................... 4-11 4.6.1 cache filling...................................................................................... 4-11 4.6.2 cache pushes ................................................................................... 4-13 4.7 cache operation summary................................................................... 4-13 4.7.1 instruction cache............................................................................... 4-14 4.7.2 data cache........................................................................................ 4-15 section 5 signal description 5.1 address bus (a31?0) ......................................................................... 5-4 5.2 data bus (d31?0) ............................................................................... 5-5 5.3 transfer attribute signals...................................................................... 5-5 5.3.1 transfer type (tt1, tt0) .................................................................. 5-5 5.3.2 transfer modifier (tm2?m0) ........................................................... 5-6 5.3.3 transfer line number (tln1, tln0)................................................. 5-6 5.3.4 user-programmable attributes (upa1, upa0) .................................. 5-7 5.3.5 read/write (r/ w ) .............................................................................. 5-7 5.3.6 transfer size (siz1, siz0) ................................................................ 5-7 5.3.7 lock ( lock ) ...................................................................................... 5-7 5.3.8 lock end ( locke ) ............................................................................ 5-7 5.3.9 cache inhibit out ( ciout ) ................................................................ 5-8 5.4 bus transfer control signals ................................................................ 5-8 5.4.1 transfer start ( ts ) ............................................................................. 5-8 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola M68040 user? manual ix table of contents (continued) paragraph page number title number 5.4.2 transfer in progress ( tip ) ................................................................. 5-8 5.4.3 transfer acknowledge ( ta ) ............................................................... 5-8 5.4.4 transfer error acknowledge ( tea ) .................................................... 5-8 5.4.5 transfer cache inhibit ( tci ) .............................................................. 5-9 5.4.6 transfer burst inhibit ( tbi ) ................................................................. 5-9 5.5 snoop control signals........................................................................... 5-9 5.5.1 snoop control (sc1, sc0) ................................................................ 5-9 5.5.2 memory inhibit ( mi )............................................................................ 5-9 5.6 arbitration signals ................................................................................. 5-10 5.6.1 bus request ( br ) .............................................................................. 5-10 5.6.2 bus grant ( bg ) .................................................................................. 5-10 5.6.3 bus busy ( bb ).................................................................................... 5-10 5.7 processor control signals ..................................................................... 5-10 5.7.1 cache disable ( cdis )........................................................................ 5-10 5.7.2 reset in ( rsti ) .................................................................................. 5-11 5.7.3 reset out ( rsto ).............................................................................. 5-11 5.8 interrupt control signals........................................................................ 5-11 5.8.1 interrupt priority level ( ipl2 ipl0 ).................................................... 5-11 5.8.2 interrupt pending status ( ipend ) ...................................................... 5-12 5.8.3 autovector ( avec ) ............................................................................. 5-12 5.9 status and clock signals ...................................................................... 5-12 5.9.1 processor status (pst3?st0) ........................................................ 5-12 5.9.2 bus clock (bclk) .............................................................................. 5-14 5.9.3 processor clock (pclk)?ot on mc68040v and mc68ec040v ... 5-14 5.10 mmu disable ( mdis )?ot on mc68ec040 ......................................... 5-14 5.11 data latch enable (dle)?nly on mc68040...................................... 5-14 5.12 test signals .......................................................................................... 5-15 5.12.1 test clock (tck) ............................................................................... 5-15 5.12.2 test mode select (tms) .................................................................... 5-15 5.12.3 test data in (tdi) .............................................................................. 5-15 5.12.4 test data out (tdo) ......................................................................... 5-15 5.12.5 test reset ( trst )?ot on mc68040v and mc68ec040v............. 5-15 5.13 power supply connections ................................................................... 5-15 5.14 signal summary .................................................................................... 5-16 section 6 ieee 1149.1 test access port (jtag) 6.1 overview ................................ ............................................................... 6-2 6.2 instruction shift register ....................................................................... 6-3 6.2.1 extest ............................................................................................. 6-3 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
x M68040 user? manual motorola table of contents (continued) paragraph page number title number 6.2.2 highz ............................................................................................... 6-4 6.2.3 sample/preload.......................................................................... 6-4 6.2.4 drvctl.t ......................................................................................... 6-4 6.2.5 shutdown ..................................................................................... 6-5 6.2.6 private ........................................................................................... 6-5 6.2.7 drvctl.s......................................................................................... 6-5 6.2.8 bypass ............................................................................................ 6-6 6.3 boundary scan register ....................................................................... 6-6 6.4 restrictions ........................................................................................... 6-12 6.5 disabling the ieee standard 1149.1a operation ................................ 6-13 6.6 motorola M68040 bsdl description (version 2.2) ............................... 6-15 6.7 mc68040, mc68lc040, mc68ec040 jtag electrical characteristics .......................................................... 6-21 section 7 bus operation 7.1 bus characteristics ............................................................................... 7-1 7.2 data transfer mechanism..................................................................... 7-3 7.3 misaligned operands ............................................................................ 7-6 7.4 processor data transfers ..................................................................... 7-9 7.4.1 byte, word, and long-word read transfers .................................... 7-10 7.4.2 line read transfer ............................................................................ 7-12 7.4.3 byte, word, and long-word write transfers .................................... 7-20 7.4.4 line write transfers .......................................................................... 7-22 7.4.5 read-modify-write transfers (locked transfers) ............................. 7-26 7.5 acknowledge bus cycles ...................................................................... 7-29 7.5.1 interrupt acknowledge bus cycles .................................................... 7-29 7.5.1.1 interrupt acknowledge bus cycle (terminated normally) ............ 7-31 7.5.1.2 autovector interrupt acknowledge bus cycle ................................ 7-33 7.5.1.3 spurious interrupt acknowledge bus cycle................................... 7-34 7.5.2 breakpoint interrupt acknowledge bus cycle ....................................... 7-35 7.6 bus exception control cycles............................................................... 7-36 7.6.1 bus errors ......................................................................................... 7-37 7.6.2 retry operation ................................................................................. 7-41 7.6.3 double bus fault ............................................................................... 7-43 7.7 bus synchronization ............................................................................. 7-43 7.8 bus arbitration and examples .............................................................. 7-44 7.8.1 bus arbitration ................................................................................... 7-45 7.8.2 bus arbitration examples .................................................................. 7-52 7.8.2.1 dual M68040 fairness arbitration ................................................. 7-52 7.8.2.2 dual M68040 prioritized arbitration ............................................... 7-54 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola M68040 user? manual xi table of contents (continued) paragraph page number title number 7.8.2.3 M68040 synchronous dma arbitration .......................................... 7-55 7.8.2.4 M68040 asynchronous dma arbitration ........................................ 7-57 7.9 bus snooping operation ....................................................................... 7-59 7.9.1 snoop-inhibited cycle........................................................................ 7-60 7.9.2 snoop-enabled cycle (no intervention required) ............................ 7-61 7.9.3 snoop read cycle (intervention required) ....................................... 7-63 7.9.4 snoop write cycle (intervention required) ....................................... 7-63 7.10 reset operation .................................................................................... 7-65 7.11 special modes of operation .................................................................. 7-68 7.11.1 output buffer impedance selection ................................................... 7-68 7.11.2 multiplexed bus mode ....................................................................... 7-68 7.11.3 data latch enable mode ................................................................... 7-69 section 8 exception processing 8.1 exception processing overview ............................................................ 8-1 8.2 integer unit exceptions ......................................................................... 8-5 8.2.1 access fault exception ..................................................................... 8-6 8.2.2 address error exception.................................................................... 8-8 8.2.3 instruction trap exception ................................................................. 8-8 8.2.4 illegal instruction and unimplemented instruction exceptions .......... 8-9 8.2.5 privilege violation exception ............................................................. 8-9 8.2.6 trace exception ................................................................................. 8-10 8.2.7 format error exception ..................................................................... 8-11 8.2.8 breakpoint instruction exception ....................................................... 8-12 8.2.9 interrupt exception ............................................................................ 8-12 8.2.10 reset exception................................................................................. 8-17 8.3 exception priorities ............................................................................... 8-19 8.4 return from exceptions........................................................................ 8-20 8.4.1 four-word stack frame (format $0) ................................................ 8-21 8.4.2 four-word throwaway stack frame (format $1) ............................. 8-21 8.4.3 six-word stack frame (format $2) ................................................... 8-22 8.4.4 floating-point post-instruction stack frame (format $3) ................. 8-23 8.4.5 eight-word stack frame (format $4)................................................ 8-23 8.4.6 access error stack frame (format $7) ............................................. 8-24 8.4.6.1 effective address ........................................................................... 8-24 8.4.6.2 special status word (ssw) ........................................................... 8-24 8.4.6.3 write-back status .......................................................................... 8-26 8.4.6.4 fault address ................................................................................. 8-26 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
xii M68040 user? manual motorola table of contents (continued) paragraph page number title number 8.4.6.5 write-back address and write-back data ................................ ..... 8-26 8.4.6.6 push data ...................................................................................... 8-27 8.4.6.7 access error stack frame return from exception ....................... 8-27 section 9 floating-point unit (mc68040 only) 9.1 floating-point unit pipeline ................................................................... 9-1 9.2 floating-point user programming model .............................................. 9-2 9.2.1 floating-point data registers (fp7?p0) ......................................... 9-2 9.2.2 floating-point control register (fpcr) ............................................ 9-3 9.2.2.1 exception enable byte ................................................................... 9-3 9.2.2.2 mode control byte ......................................................................... 9-3 9.2.3 floating-point status register (fpsr) .............................................. 9-4 9.2.3.1 floating-point condition code byte............................................... 9-4 9.2.3.2 quotient byte ................................................................................. 9-5 9.2.3.3 exception status byte.................................................................... 9-5 9.2.3.4 accrued exception (aexc) byte. .................................................. 9-5 9.2.4 floating-point instruction address register (fpiar) ........................ 9-6 9.3 floating-point data formats and data types....................................... 9-7 9.4 computational accuracy ....................................................................... 9-11 9.4.1 intermediate result ........................................................................... 9-12 9.4.2 rounding the result .......................................................................... 9-13 9.5 postprocessing operation..................................................................... 9-15 9.5.1 underflow, round, overflow ............................................................. 9-16 9.5.2 conditional testing ............................................................................ 9-16 9.6 floating-point exceptions ..................................................................... 9-20 9.6.1 unimplemented floating-point instructions....................................... 9-20 9.6.2 unsupported floating-point data types ........................................... 9-22 9.7 floating-point arithmetic exceptions .................................................... 9-24 9.7.1 branch/set on unordered (bsun) .................................................... 9-25 9.7.1.1 maskable exception conditions..................................................... 9-26 9.7.1.2 nonmaskable exception conditions .............................................. 9-27 9.7.2 signaling not-a-number (snan)....................................................... 9-27 9.7.2.1 maskable exception conditions..................................................... 9-27 9.7.2.2 nonmaskable exception conditions .............................................. 9-27 9.7.3 operand error ................................................................................... 9-28 9.7.3.1 maskable exception conditions..................................................... 9-29 9.7.3.2 nonmaskable exception conditions .............................................. 9-30 9.7.4 overflow ............................................................................................ 9-31 9.7.4.1 maskable exception conditions..................................................... 9-31 9.7.4.2 nonmaskable exception conditions .............................................. 9-31 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola M68040 user? manual xiii table of contents (continued) paragraph page number title number 9.7.5 underflow .......................................................................................... 9-33 9.7.5.1 maskable exception conditions ..................................................... 9-34 9.7.5.2 nonmaskable exception conditions .............................................. 9-34 9.7.6 divide by zero.................................................................................... 9-36 9.7.7 inexact result .................................................................................... 9-36 9.8 floating-point state frames.................................................................. 9-39 section 10 instruction timings 10.1 overview ............................................................................................... 10-3 10.2 instruction timing examples ................................................................. 10-5 10.3 cinv and cpush instruction timing.................................................... 10-8 10.4 move instruction timing ...................................................................... 10-9 10.5 miscellaneous integer unit instruction timings................................ ..... 10-11 10.6 integer unit instruction timings ............................................................ 10-13 10.7 floating-point unit instruction timings ................................................. 10-29 10.7.1 miscellaneous integer unit support timings ................................ ..... 10-29 10.7.2 integer unit support timings ............................................................. 10-30 10.7.3 timings in the floating-point unit ...................................................... 10-35 section 11 mc68040 electrical and thermal characteristics 11.1 maximum ratings ................................................................................. 11-1 11.2 t hermal characteristics ........................................................................ 11-1 11.3 dc electrical specifications .................................................................. 11-2 11.4 power dissipation ................................................................................. 11-2 11.5 clock ac timing specifications ............................................................ 11-3 11.6 output ac timing specifications .......................................................... 11-4 11.7 input ac timing specifications ............................................................. 11-5 11.8 mc68040 thermal device characteristics............................................ 11-12 11.8.1 mc68040 die and package ............................................................... 11-12 11.8.2 mc68040 power considerations ....................................................... 11-12 11.9 mc68040 thermal management techniques ....................................... 11-14 11.9.1 still air................................................................................................ 11-17 11.9.2 forced air .......................................................................................... 11-18 11.9.3 with heat sink ................................................................................... 11-19 11.9.4 with heat sink and forced air .......................................................... 11-22 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
xiv M68040 user? manual motorola table of contents (continued) paragraph page number title number section 12 ordering information and mechanical data 12.1 ordering information ............................................................................. 12-1 12.2 pin assignments ................................................................................... 12-1 12.2.1 mc68040 pin grid array ................................................................... 12-2 12.2.2 mc68lc040 pin grid array............................................................... 12-3 12.2.3 mc68ec040 pin grid array .............................................................. 12-4 12.2.4 mc68040v and mc68ec040v pin grid array .................................. 12-5 12.2.5 mc68lc040 quad flat pack............................................................. 12-6 12.2.6 mc68ec040 quad flat pack ............................................................ 12-6 12.2.7 mc68040v and mc68ec040v quad flat pack................................ 12-7 12.3 mechanical data ................................................................................... 12-9 appendix a mc68lc040 a.1 mc68lc040 differences....................................................................... a-5 a.2 interrupt priority level ( ipl2 ipl0 ) ....................................................... a-5 a.3 jtag scan (js0) .................................................................................. a-5 a.4 data latch and multiplexed bus modes ............................................... a-5 a.5 floating-point unit (fpu) ...................................................................... a-5 a.5.1 unimplemented floating-point instructions and exceptions ............. a-6 a.5.2 mc68lc040 stack frames ............................................................... a-7 a.6 mc68lc040 electrical characteristics ................................................. a-7 a.6.1 maximum ratings .............................................................................. a-8 a.6.2 thermal characteristics .................................................................... a-8 a.6.3 dc electrical specifications .............................................................. a-8 a.6.4 power dissipation.............................................................................. a-9 a.6.5 clock ac timing specifications ........................................................ a-9 a.6.6 output ac timing specifications ....................................................... a-11 a.6.7 input ac timing specifications.......................................................... a-12 appendix b mc68ec040 b.1 mc68ec040 differences ...................................................................... b-4 b.2 jtag scan (js1?s0) .......................................................................... b-5 b.3 access control units............................................................................. b-5 b.3.1 access control registers .................................................................. b-5 b.3.2 address comparison ......................................................................... b-7 b.3.3 effect of rsti on the acu................................................................. b-8 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola M68040 user? manual xv table of contents (continued) paragraph page number title number b.4 special modes of operation ................................................................. b-8 b.5 exception processing............................................................................ b-10 b.5.1 unimplemented floating-point instructions and exceptions ............. b-10 b.5.2 mc68ec040 stack frames ............................................................... b-11 b.6 software considerations ....................................................................... b-12 b.7 mc68ec040 electrical characteristics ................................................. b-12 b.7.1 maximum ratings .............................................................................. b-12 b.7.2 thermal characteristics ..................................................................... b-12 b.7.3 dc electrical specifications ............................................................... b-13 b.7.4 power dissipation .............................................................................. b-13 b.7.5 clock ac timing specifications ......................................................... b-14 b.7.6 output ac timing specifications ....................................................... b-15 b.7.7 input ac timing specifications.......................................................... b-16 appendix c mc68040v and mc68ec040v c.1 additional signals.................................................................................. c-1 c.1.1 low frequency operation (lfo) ....................................................... c-2 c.1.2 loss of clock (loc) .......................................................................... c-2 c.1.3 system clock disable (scd)............................................................. c-2 c.2 low-power stop mode .......................................................................... c-3 c.2.1 bus arbitration and snooping ............................................................ c-5 c.2.2 low frequency operation ................................................................. c-5 c.2.3 changing bclk frequency ............................................................... c-5 c.2.4 lpstop instruction summary .......................................................... c-6 c.3 clocking during normal operation ....................................................... c-7 c.4 reset operation .................................................................................... c-7 c.5 power cycling ....................................................................................... c-9 c.6 mc68040v and mc68ec040v jtag (preliminary) .............................. c-10 c.6.1 instruction shift register ................................................................... c-11 c.6.1.1 extest ......................................................................................... c-12 c.6.1.2 highz ............................................................................................ c-12 c.6.1.3 sample/preload ...................................................................... c-12 c.6.1.4 clamp........................................................................................... c-12 c.6.1.5 bypass......................................................................................... c-13 c.6.2 boundary scan register.................................................................... c-13 c.6.3 restrictions ........................................................................................ c-16 c.6.4 disabling the ieee standard 1149.1a operation............................. c-16 c.6.5 mc68040v and mc68ec040v jtag electrical characteristics ....... c-17 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
xvi M68040 user? manual motorola table of contents (continued) paragraph page number title number c.7 mc68040v and mc68ec040v electrical characteristics..................... c-19 c.7.1 maximum ratings .............................................................................. c-19 c.7.2 thermal characteristics .................................................................... c-19 c.7.3 dc electrical specifications .............................................................. c-20 c.7.4 power dissipation.............................................................................. c-20 c.7.5 clock ac timing specifications ........................................................ c-21 c.7.6 output ac timing specifications ....................................................... c-22 c.7.7 input ac timing specifications.......................................................... c-23 appendix d m68000 family summary appendix e floating-point emulation (M68040fpsp) index f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola M68040 user? manual xvii list of illustrations figure page number title number 1-1 block diagram .............................................................................................. 1-4 1-2 programming model ..................................................................................... 1-7 2-1 integer unit pipeline ..................................................................................... 2-2 2-2 write-back cycle block diagram ................................................................. 2-3 2-3 integer unit user programming model......................................................... 2-4 2-4 integer unit supervisor programming model ............................................... 2-6 2-5 status register............................................................................................. 2-7 3-1 memory management unit ........................................................................... 3-2 3-2 memory management programming model ................................................. 3-3 3-3 urp and srp register formats.................................................................. 3-4 3-4 translation control register format ............................................................ 3-4 3-5 transparent translation register format .................................................... 3-5 3-6 mmu status register format....................................................................... 3-6 3-7 translation table structure .......................................................................... 3-8 3-8 logical address format ............................................................................... 3-9 3-9 detailed flowchart of table search operation ............................................ 3-10 3-10 detailed flowchart of descriptor fetch operation ....................................... 3-11 3-11 table descriptor formats............................................................................. 3-13 3-12 page descriptor formats ............................................................................. 3-13 3-13 example translation table .......................................................................... 3-17 3-14 translation table using indirect descriptors ............................................... 3-18 3-15 translation table using shared tables ....................................................... 3-19 3-16 translation table with nonresident tables .................................................. 3-20 3-17 translation table structure for two tasks .................................................. 3-24 3-18 logical address map with shared supervisor and user address spaces... 3-24 3-19 translation table using s-bit and w-bit to set protection ......................... 3-25 3-20 atc organization......................................................................................... 3-26 3-21 atc entry and tag fields ............................................................................ 3-27 3-22 address translation flowchart..................................................................... 3-32 3-23 mmu status interpretation ........................................................................... 3-35 4-1 overview of internal caches ........................................................................ 4-2 4-2 cache line formats ..................................................................................... 4-3 4-3 caching operation ....................................................................................... 4-4 4-4 cache control register ................................................................................ 4-5 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
xviii M68040 user? manual motorola list of illustrations (continued) figure page number title number 4-5 instruction-cache line state diagram ......................................................... 4-14 4-6 data-cache line state diagram .................................................................. 4-16 5-1 functional signal groups ............................................................................. 5-4 6-1 M68040 test logic block diagram .............................................................. 6-2 6-2 bypass register ........................................................................................... 6-6 6-3 output latch cell (o.latch) ......................................................................... 6-7 6-4 input pin cell (i.pin) ..................................................................................... 6-7 6-5 output control cells (io.ctl) ........................................................................ 6-8 6-6 general arrangement of bidirectional pins .................................................. 6-8 6-7 circuit disabling ieee standard 1149.1a .................................................... 6-14 6-8 clock input timing diagram ......................................................................... 6-22 6-9 trst timing diagram .................................................................................. 6-22 6-10 boundary scan timing diagram .................................................................. 6-23 6-11 test access port timing diagram ............................................................... 6-23 7-1 signal relationships to clocks..................................................................... 7-2 7-2 internal operand representation ................................................................. 7-3 7-3 data multiplexing ......................................................................................... 7-4 7-4 byte enable signal generation and pal equation ...................................... 7-5 7-5 example of a misaligned long-word transfer............................................. 7-7 7-6 example of a misaligned word transfer ...................................................... 7-7 7-7 misaligned long-word read transfer timing ............................................. 7-8 7-8 byte, word, and long-word read transfer flowchart ................................ 7-10 7-9 byte, word, and long-word read transfer timing................................ ..... 7-11 7-10 line read transfer flowchart...................................................................... 7-14 7-11 line read transfer timing .......................................................................... 7-15 7-12 burst-inhibited line read transfer flowchart ............................................. 7-18 7-13 burst-inhibited line read transfer timing .................................................. 7-19 7-14 byte, word, and long-word write transfer flowchart ................................ 7-20 7-15 long-word write transfer timing ................................................................ 7-21 7-16 line write transfer flowchart ...................................................................... 7-23 7-17 line write transfer timing........................................................................... 7-24 7-18 locked transfer for tas instruction timing ................................................ 7-27 7-19 interrupt pending procedure ........................................................................ 7-30 7-20 assertion of ipend ...................................................................................... 7-30 7-21 interrupt acknowledge bus cycle flowchart ............................................... 7-32 7-22 interrupt acknowledge bus cycle timing .................................................... 7-33 7-23 autovector interrupt acknowledge bus cycle timing .................................. 7-34 7-24 breakpoint interrupt acknowledge bus cycle flowchart ............................. 7-35 7-25 breakpoint interrupt acknowledge bus cycle timing .................................. 7-36 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola M68040 user? manual xix list of illustrations (continued) figure page number title number 7-26 word write access terminated with tea timing ........................................ 7-39 7-27 line read access terminated with tea timing .......................................... 7-40 7-28 retry read transfer timing ......................................................................... 7-41 7-29 retry operation on line write ...................................................................... 7-42 7-30 M68040 internal interpretation state diagram and external bus arbiter circuit ........................................................................ 7-47 7-31 lock violation example ................................................................................ 7-49 7-32 processor bus request timing.................................................................... 7-50 7-33 arbitration during relinquish and retry timing ........................................... 7-51 7-34 implicit bus ownership arbitration timing.................................................... 7-52 7-35 dual M68040 fairness arbitration state diagram ........................................ 7-53 7-36 dual M68040 prioritized arbitration state diagram ................................ ..... 7-55 7-37 M68040 synchronous dma arbitration ........................................................ 7-56 7-38 sample synchronizer circuit ........................................................................ 7-57 7-39 M68040 asynchronous dma arbitration ...................................................... 7-58 7-40 snoop-inhibited bus cycle ........................................................................... 7-61 7-41 snoop access with memory response........................................................ 7-62 7-42 snooped line read, memory inhibited ........................................................ 7-64 7-43 snooped long-word write, memory inhibited ............................................. 7-65 7-44 initial power-on reset timing...................................................................... 7-66 7-45 normal reset timing ................................................................................... 7-67 7-46 multiplexed address and data bus (line write)........................................... 7-69 7-47 dle mode block diagram ............................................................................ 7-70 7-48 dle versus normal data read timing ........................................................ 7-71 8-1 general exception processing flowchart .................................................... 8-3 8-2 general form of exception stack frame ..................................................... 8-4 8-3 interrupt recognition examples ................................................................... 8-14 8-4 interrupt exception processing flowchart .................................................... 8-16 8-5 reset exception processing flowchart........................................................ 8-18 8-6 flowchart of rte instruction for throwaway four-word frame .................. 8-22 8-7 special status word format ........................................................................ 8-24 8-8 write-back status format ............................................................................ 8-26 9-1 floating-point user programming model ..................................................... 9-2 9-2 floating-point control register .................................................................... 9-4 9-3 fpsr condition code byte.......................................................................... 9-4 9-4 fpsr quotient byte ..................................................................................... 9-5 9-5 fpsr exception status byte ....................................................................... 9-5 9-6 fpsr accrued exception byte .................................................................... 9-6 9-7 intermediate result format.......................................................................... 9-12 9-8 rounding algorithm flowchart ..................................................................... 9-14 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
xx M68040 user? manual motorola list of illustrations (continued) figure page number title number 9-9 format of denormalized operand in state frame ....................................... 9-24 9-10 mc68040 floating-point state frames ........................................................ 9-40 9-11 mapping of command bits for cmdreg3b field ....................................... 9-42 10-1 simple instruction timing example .............................................................. 10-5 10-2 instruction overlap with multiple clocks ...................................................... 10-6 10-3 interlocked stages ....................................................................................... 10-7 11-1 clock input timing diagram ......................................................................... 11-3 11-2 drive levels and test points for ac specifications ................................ ..... 11-6 11-3 read/write timing ....................................................................................... 11-7 11-4 bus arbitration timing.................................................................................. 11-8 11-5 snoop hit timing ......................................................................................... 11-9 11-6 snoop miss timing ...................................................................................... 11-10 11-7 other signal timing ..................................................................................... 11-11 11-8 mc68040 termination network ................................................................... 11-15 11-9 typical configuration for rc termination network ...................................... 11-15 11-10 heat sink with adhesive .............................................................................. 11-20 11-11 heat sink with attachment ........................................................................... 11-21 12-1 pga package dimensions........................................................................... 12-9 12-2 qfp package dimensions ........................................................................... 12-10 a-1 mc68lc040 block diagram ........................................................................ a-2 a-2 mc68lc040 programming model ............................................................... a-3 a-3 mc68lc040 functional signal groups........................................................ a-4 a-4 clock input timing diagram ......................................................................... a-10 a-5 read/write timing ....................................................................................... a-13 a-6 bus arbitration timing.................................................................................. a-14 a-7 snoop hit timing ......................................................................................... a-15 a-8 snoop miss timing ...................................................................................... a-16 a-9 other signal timing ..................................................................................... a-17 b-1 mc68ec040 block diagram ........................................................................ b-2 b-2 mc68ec040 programming model ............................................................... b-3 b-3 mc68ec040 functional signal groups ....................................................... b-4 b-4 mc68ec040 access control register format ............................................ b-6 b-5 mc68ec040 initial power-on reset timing................................................ b-8 b-6 mc68ec040 normal reset timing .............................................................. b-9 b-7 clock input timing diagram ......................................................................... b-14 b-8 read/write timing ....................................................................................... b-17 b-9 bus arbitration timing.................................................................................. b-18 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola M68040 user? manual xxi list of illustrations (continued) figure page number title number b-10 snoop hit timing.......................................................................................... b-19 b-11 snoop miss timing....................................................................................... b-20 b-12 other signal timing ..................................................................................... b-21 c-1 mc68040v and mc68ec040v functional signal groups ........................... c-3 c-2 mc68040v and mc68ec040v initial power-on reset timing ................... c-8 c-3 mc68040v and mc68ec040v normal reset timing.................................. c-9 c-4 mc68040v and mc68ec040v test logic block diagram .......................... c-11 c-5 bypass register ........................................................................................... c-13 c-6 output latch cell (o.latch) ......................................................................... c-14 c-7 input pin cell (i.pin) ..................................................................................... c-14 c-8 output control cells (io.ctl) ........................................................................ c-15 c-9 general arrangement of bidirectional pins .................................................. c-15 c-10 circuit disabling ieee standard 1149.1a ................................................... c-17 c-11 drive levels and test points for ac specifications ................................ ..... c-18 c-12 clock input timing diagram ......................................................................... c-21 c-13 read/write timing........................................................................................ c-24 c-14 bus arbitration timing .................................................................................. c-25 c-15 snoop hit timing.......................................................................................... c-26 c-16 snoop miss timing....................................................................................... c-27 c-17 other signal timing ..................................................................................... c-28 c-18 going into lpstop with arbitration ............................................................. c-29 c-19 lpstop no arbitration, cpu is master ....................................................... c-30 c-20 exiting lpstop with interrupt...................................................................... c-31 c-21 exiting of lpstop with reset ................................................................... c-31 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
xxii M68040 user? manual motorola list of tables table page number title number 1-1 M68040 data formats ................................................................................. 1-9 1-2 effective addressing modes ........................................................................ 1-10 1-3 notational conventions ................................................................................ 1-11 1-4 instruction set summary.............................................................................. 1-14 3-1 updating u-bit and m-bit for page descriptors............................................ 3-22 3-2 sfc and dfc values................................................................................... 3-22 4-1 snoop control encoding .............................................................................. 4-9 4-2 tlnx encoding ............................................................................................ 4-11 4-3 instruction-cache line state transitions ..................................................... 4-15 4-4 data-cache line state transitions .............................................................. 4-17 5-1 signal index ................................................................................................. 5-2 5-2 transfer-type encoding .............................................................................. 5-5 5-3 normal and move16 access transfer modifier encoding .......................... 5-6 5-4 alternate access transfer modifier encoding .............................................. 5-6 5-5 output driver control groups ...................................................................... 5-11 5-6 processor status encoding .......................................................................... 5-13 5-7 signal summary........................................................................................... 5-16 6-1 ieee standard 1149.1a instructions ........................................................... 6-3 6-2 boundary scan bit definitions ..................................................................... 6-10 7-1 data bus requirements for read and write cycles .................................... 7-4 7-2 summary of access types versus bus signal encodings........................... 7-6 7-3 memory alignment influence on noncachable and write-through bus cycles ......................................................................... 7-9 7-4 interrupt acknowledge termination summary ............................................. 7-31 7-5 ta and tea assertion results ..................................................................... 7-37 7-6 M68040 bus arbitration states .................................................................... 7-48 8-1 exception vector assignments .................................................................... 8-5 8-2 tracing control ............................................................................................ 8-11 8-3 interrupt levels and mask values................................................................ 8-12 8-4 exception priority groups ............................................................................ 8-19 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola M68040 user? manual xxiii list of tables (continued) table page number title number 8-5 write-back data alignment .......................................................................... 8-27 8-6 access error stack frame combinations .................................................... 8-31 9-1 floating-point control register encodings .................................................. 9-3 9-2 mc68040 fpu data formats and data types ............................................ 9-7 9-3 single-precision real format summary ...................................................... 9-8 9-4 double-precision real format summary..................................................... 9-9 9-5 extended-precision real format summary ................................................. 9-10 9-6 packed decimal real format summary ...................................................... 9-11 9-7 floating-point condition code encodings.................................................... 9-17 9-8 floating-point conditional tests .................................................................. 9-19 9-9 floating-point exception vectors ................................................................. 9-20 9-10 unimplemented instructions ......................................................................... 9-21 9-11 possible operand errors exceptions ........................................................... 9-29 9-12 overflow rounding mode values................................................................. 9-32 9-13 underflow rounding mode values............................................................... 9-34 9-14 possible divide by zero exceptions ............................................................. 9-36 9-15 divide by zero rounding mode values........................................................ 9-37 9-16 state frame field information ...................................................................... 9-44 10-1 instruction timing index ............................................................................... 10-1 10-2 number of memory accesses ...................................................................... 10-3 10-3 cinv timing ................................................................................................. 10-8 10-4 cpush best and worst case timing .......................................................... 10-8 11-1 maximum power dissipation for output buffer mode configuration ............ 11-13 11-2 thermal parameters with no heat sink or airflow ....................................... 11-17 11-3 thermal parameters with forced airflow and no heat sink for the mc68040 .................................................................. 11-18 11-4 thermal parameters with forced airflow and no heat sink for the mc68lc040 and mc68ec040 ................................. 11-19 11-5 thermal parameters with heat sink and no airflow .................................... 11-21 11-6 thermal parameters with heat sink and airflow.......................................... 11-22 c-1 additional mc68040v and mc68ec040v signals....................................... c-2 c-2 bus encodings during lpstop broadcast cycle ....................................... c-4 c-3 ieee standard 1149.1a instructions............................................................ c-12 e-1 mc68040 floating-point instructions ........................................................... e-2 e-2 mc68040fpsp floating-point instructions.................................................. e-3 e-3 support for data types and data formats .................................................. e-4 e-4 exception conditions ................................................................................... e-4 f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola M68040 user? manual 1- 1 section 1 introduction the mc68040, mc68040v, mc68lc040, mc68ec040, and mc68ec040v (collectively called M68040) are motorola? third generation of m68000-compatible, high-performance, 32-bit microprocessors. all five devices are virtual memory microprocessors employing multiple concurrent execution units and a highly integrated architecture that provides very high performance in a monolithic hcmos device. they integrate an mc68030-compatible integer unit (iu) and two independent caches. the mc68040, mc68040v, and mc68lc040 contain dual, independent, demand-paged memory management units (mmus) for instruction and data stream accesses and independent, 4-kbyte instruction and data caches. the mc68040 contains an mc68881/mc68882-compatible floating- point unit (fpu). the use of multiple independent execution pipelines, multiple internal buses, and a full internal harvard architecture, including separate physical caches for both instruction and data accesses, achieves a high degree of instruction execution parallelism on all three processors. the on-chip bus snoop logic, which directly supports cache coherency in multimaster applications, enhances cache functionality. the M68040 family is user object-code compatible with previous m68000 family members and is specifically optimized to reduce the execution time of compiler-generated code. all five processors implement motorola? latest hcmos technology, providing an ideal balance between speed, power, and physical device size. 1.1 differences because the functionality of individual M68040 family members are similar, this manual is organized so that the reader will take the following differences into account while reading the rest of this manual. unless otherwise noted, all references to M68040, with the exception of the differences outlined below, will apply to the mc68040, mc68040v, mc68lc040, mc68ec040, and mc68ec040v. the following paragraphs describe the differences of mc68040v, mc68lc040, mc68ec040, and the mc68ec040v from the mc68040. 1.1.1 mc68040v and mc68lc040 the mc68040v and mc68lc040 are derivatives of the mc68040. they implement the same iu and mmu as the mc68040, but have no fpu. the mc68lc040 is pin compatible with the mc68040. the mc68040v is not pin compatible with the mc68040 and contains some additional features. the following differences exist between the mc68040v, mc68lc040, and mc68040: f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
1- 2 M68040 user? manual motorola the dle pin name has been changed to js0 on both the mc68040v and mc68lc040. in addition, the mc68040v contains three new pins, system clock disable ( scd ), low frequency operation ( lfo ), and loss of clock (loc ). the mc68040v and mc68lc040 do not implement the data latch enable (dle), multiplexed, or output buffer impedance selection modes of operation. they implement only the small output buffer mode of operation. all timing and drive capabilities on both devices are equivalent to those of the mc68040 in small output buffer impedance mode. the mc68040v has an additional mode of operation, the low-power stop mode of operation. the mc68040v and mc68lc040 do not contain an fpu, causing unimplemented floating-point exceptions to occur using a new stack frame format. the mc68040v is a 3.3 volt static microprocessor that operates down to 0 mhz. for specific details on the mc68lc040, refer to appendix a mc68lc040 . for specific details on the mc68040v, refer to both appendix a mc68lc040 and appendix c mc68040v and mc68ec040v . disregard all information concerning the fpu when reading the following subsections. 1.1.2 mc68ec040 and mc68ec040v the mc68ec040 and mc68ec040v are derivatives of the mc68040. they implement the same iu as the mc68040, but have no fpu or mmu, which embedded control applications generally do not require. the mc68ec040 is pin compatible with the mc68040. the following differences exist between the mc68ec040, mc68ec040v, and the mc68040: the dle and mdis pin names have been changed to js0 and js1, respectively. ptest and pflush instructions cause an undetermined number of bus cycles; the user should not execute these instructions. the access control unit (acu) replaces the mmu. the mc68ec040 and mc68ec040v acu has two data and two instruction registers that are called data and instruction transparent translation registers in the mc68040. the mc68ec040 and mc68ec040v do not implement the dle, multiplexed, or output buffer impedance selection modes of operation. they only implement the small output buffer mode of operation. all mc68ec040 and mc68ec040v timing and drive capabilities are equivalent to the mc68040 in small output buffer mode. the mc68ec040 and mc68ec040v do not contain an fpu, causing unimplemented floating-point exceptions to occur using a new stack frame format. the mc68040v is a 3.3 volt static microprocessor that operates down to 0 mhz. refer to appendix b mc68ec040 for specific details on the mc68ec040. refer to appendix b mc68ec040 and appendix c mc68040v and mc68ec040v for specific details on the mc68ec040v. disregard information concerning the fpu and mmu when reading the following subsections. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola M68040 user? manual 1- 3 1.2 features the main features of the M68040 are as follows: 6-stage pipeline, mc68030-compatible iu mc68881/mc68882-compatible fpu independent instruction and data mmus simultaneously accessible, 4-kbyte physical instruction cache and 4-kbyte physical data cache low-latency bus accesses for reduced cache miss penalty multimaster/multiprocessor support via bus snooping concurrent iu, fpu, mmu, and bus controller operation maximizes throughput 32-bit, nonmultiplexed external address and data buses with synchronous interface user object-code compatible with all earlier m68000 microprocessors 4-gbyte direct addressing range software support including optimizing c compiler and unix ? system v port the on-chip fpu and large physical instruction and data caches yield improved system performance and increased functionality. the independent instruction and data mmus and increased internal parallelism also improve performance. 1.3 extensions to the m68000 family the M68040 is compatible with the ansi/ieee standard 754 for binary floating-point arithmetic . the mc68040? fpu has been optimized to execute the most commonly used subset of the mc68881/mc68882 instruction sets and includes additional instruction formats for single- and double-precision rounding results. software emulates floating-point instructions not directly supported in hardware. refer to appendix e M68040 floating- point emulation (mc68040fpsp) for details on software emulation. the move16 user instruction is new to the instruction set, supporting efficient 16-byte memory-to-memory data transfers. 1.4 functional blocks figure 1-1 illustrates a simplified block diagram of the mc68040. refer to appendix a mc68lc040 for information on the mc68lc040? and mc68040v's functional blocks; and appendix b mc68ec040 for information on the mc68ec040? and mc68ec040v's functional blocks. the M68040 iu pipeline has been expanded from the mc68030 to include effective address calculation ( calculate) and operand fetch ( fetch) stages with commonly used effective addressing modes. conditional branches are optimized for the unix is a registered trademark of at&t bell laboratories. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
1- 4 M68040 user? manual motorola more common case of the branch taken, and both execution paths of the branch are fetched and decoded to minimize refilling of the instruction pipeline. decode ea calculate write- back integer unit convert execute write- back instruction atc instruction mmu/cache/snoop controller bus control signals data bus address bus data atc data mmu/cache/snoop controller operand data bus instruction data bus instruction cache data cache floating- point unit data memory unit instruction memory unit b u s c o n t r o l l e r instruction address data address instruction fetch execute ea fetch figure 1-1. block diagram to improve memory management, the M68040 includes separate, independent paged mmus for instruction and data accesses. each mmu stores recently used address mappings in separate 64-entry address translation caches (atcs). each mmu also has two transparent translation registers that define a one-to-one mapping for address space segments ranging in size from 16 mbytes to 4 gbytes each. two memory units independently interface with the iu and fpu. each unit consists of an mmu, an atc, a main cache, and a snoop controller. the mmus perform memory management on a demand-page basis. by translating logical-to-physical addresses using translation tables stored in memory, the mmus support virtual memory systems. each mmu stores recently used address mappings in an atc, reducing the average translation time. separate on-chip instruction and data caches operate independently and are accessed in parallel with address translation. the caches improve the overall performance of the system by reducing the number of bus transfers required by the processor to fetch information from memory and by increasing the bus bandwidth available for alternate bus f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola M68040 user? manual 1- 5 masters in the system. both caches are organized as four-way set associative with 64 sets of four lines. each line contains four long words for a storage capability of 4 kbytes for each cache (8 kbytes total). each cache and corresponding mmu is allocated separate internal address and data buses, allowing simultaneous access to both. the data cache provides write-through or copyback write modes that can be configured on a page-by-page basis. the caches are physically mapped, reducing software support for multitasking operating systems, and support external bus snooping to maintain cache coherency in multimaster systems. the bus snoop logic provides cache coherency in multimaster applications. the bus controller executes bus transfers on the external bus and prioritizes external memory requests from each cache. the M68040 bus controller supports a high-speed, nonmultiplexed, synchronous, external bus interface supporting burst accesses for both reads and writes to provide high data transfer rates to and from the caches. additional bus signals support bus snooping and external cache tag maintenance. the mc68040 contains an on-chip fpu, which is user object-code compatible with the mc68881/mc68882 floating-point coprocessors. the fpu has pipelined instruction execution. floating-point instructions in the fpu execute concurrently with integer instructions in the iu. 1.5 processing states the processor is always in one of three states: normal processing, exception processing, or halted. it is in the normal processing state when executing instructions, fetching instructions and operands, and storing instruction results. exception processing is the transition from program processing to system, interrupt, and exception handling. exception processing includes fetching the exception vector, stacking operations, and refilling the instruction pipe caused after an exception. the processor enters exception processing when an exceptional internal condition arises such as tracing an instruction, an instruction results in a trap, or executing specific instructions. external conditions, such as interrupts and access errors, also cause exceptions. exception processing ends when the first instruction of the exception handler begins to execute. the processor halts when it receives an access error or generates an address error while in the exception processing state. for example, if during exception processing of one access error another access error occurs, the mc68040 is unable to complete the transition to normal processing and cannot save the internal state of the machine. the processor assumes that the system is not operational and halts. only an external reset can restart a halted processor. note that when the processor executes a stop instruction, it is in a special type of normal processing state, one without bus cycles. the processor stops, but it does not halt. 1.6 programming model the mc68040 programming model is separated into two privilege modes: supervisor and user. the s-bit in the status register (sr) indicates the privilege mode that the processor f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
1- 6 M68040 user? manual motorola uses. the iu identifies a logical address by accessing either the supervisor or user address space, maintaining the differentiation between supervisor and user modes. the mmus use the indicated privilege mode to control and translate memory accesses, protecting supervisor code, data, and resources from user program accesses. refer to appendix b mc68ec040 for details concerning the mc68ec040 address translation. programs access registers based on the indicated mode. user programs can only access registers specific to the user mode; whereas, system software executing in the supervisor mode can access all registers, using the control registers to perform supervisory functions. user programs are thus restricted from accessing privileged information, and the operating system performs management and service tasks for the user programs by coordinating their activities. this difference allows the supervisor mode to protect system resources from uncontrolled accesses. most instructions execute in either mode, but some instructions that have important system effects are privileged and can only execute in the supervisor mode. for instance, user programs cannot execute the stop or reset instructions. to prevent a user program from entering the supervisor mode, except in a controlled manner, instructions that can alter the s-bit in the sr are privileged. the trap instructions provide controlled access to operating system services for user programs. if the s-bit in the sr is set, the processor executes instructions in the supervisor mode. because the processor performs all exception processing in the supervisor mode, all bus cycles generated during exception processing are supervisor references, and all stack accesses use the active supervisor stack pointer. if the s-bit of the sr is clear, the processor executes instructions in the user mode. the bus cycles for an instruction executed in the user mode are user references. the values on the transfer modifier pins indicate either supervisor or user accesses. the processor utilizes the user mode and the user programming model when it is in normal processing. during exception processing, the processor changes from user to supervisor mode. exception processing saves the current value of the sr on the active supervisor stack and then sets the s-bit, forcing the processor into the supervisor mode. to return to the user mode, a system routine must execute one of the following instructions: move to sr, andi to sr, eori to sr, ori to sr, or rte, which execute in the supervisor mode, modifying the s-bit of the sr. after these instructions execute, the instruction pipeline is flushed and is refilled from the appropriate address space. the mc68040 integrates the functions of the iu, fpu, and mmu. the registers depicted in the programming model (see figure 1-2) provide operand storage and control for these three units. the registers are partitioned into two levels of privilege modes: user and supervisor. the user programming model is the same as the user programming model of the mc68030, which consists of 16, general-purpose, 32-bit registers and two control registers. the mc68040 user programming model also incorporates the mc68881/mc68882 programming model consisting of eight, 80-bit, floating-point data registers, a floating-point control register, a floating-point status register, and a floating- point instruction address register. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola M68040 user? manual 1- 7 only system programmers can use the supervisor programming model to implement operating system functions, i/o control, and memory management subsystems. this supervisor/user distinction in the m68000 family architecture allows for the writing of application software that executes in the user mode and migrates to the mc68040 from any m68000 family platform without modification. the supervisor programming model contains the control features that system designers need to modify system software when porting to a new design. for example, only the supervisor software can read or write to the transparent translation registers of the mc68040. the existence of the transparent translation registers does not affect the programming resources of user application programs. supervisor programming model user programming model ccr pc a7/usp a6 a5 a4 a3 a2 a1 a0 d7 d6 d5 d4 d3 d2 d1 d0 31 0 data registers address registers 31 0 79 0 fp0 fp1 fp2 fp3 fp4 fp5 fp6 fp7 fpcr fpsr fpiar floating-point data registers fp control register fp status register fp instruction address register 31 0 a7'/isp a7"/msp sr vbr sfc dfc cacr urp srp tc dtt0 dtt1 itt0 itt1 mmusr (ccr) program counter condition code register interrupt stack pointer master stack pointer status register (ccr is also shown in the user programming model) vector base register source function code destination function code cache control register user root pointer register supervisor root pointer register translation control register data transparent translation register 0 data transparent translation register 1 instruction transparent translation register 0 instruction transparent translation register 1 mmu status register user stack pointer 15 0 figure 1-2. programming model f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
1- 8 M68040 user? manual motorola the user programming model includes eight data registers, seven address registers, and a stack pointer register. the address registers and stack pointer can be used as base address registers or software stack pointers, and any of the 16 registers can be used as index registers. two control registers are available in the user mode?he program counter (pc), which usually contains the address of the instruction that the mc68040 is executing, and the lower byte of the sr, which is accessible as the condition code register (ccr). the ccr contains the condition codes that reflect the results of a previous operation and can be used for conditional instruction execution in a program. the supervisor programming model includes the upper byte of the sr, which contains operation control information. the vector base register (vbr) contains the base address of the exception vector table, which is used in exception processing. the source function code (sfc) and destination function code (dfc) registers contain 3-bit function codes. these function codes can be considered extensions to the 32-bit logical address. the processor automatically generates function codes to select address spaces for data and program accesses in the user and supervisor modes. some instructions use the alternate function code registers to specify the function codes for various operations. the cache control register (cacr) controls enabling of the on-chip instruction and data caches of the mc68040. the supervisor root pointer (srp) and user root pointer (urp) registers point to the root of the address translation table tree to be used for supervisor and user mode accesses. the translation control register (tcr) enables logical-to-physical address translation and selects either 4- or 8-kbyte page sizes. there are four transparent translation registers, two for instruction accesses and two for data accesses. these registers allow portions of the logical address space to be transparently mapped and accessed without the use of resident descriptors in an atc. the mmu status register (mmusr) contains status information derived from the execution of a ptest instruction. the ptest instruction searches the translation tables for the logical address, specified by this instruction? effective address field and the dfc, and returns status information corresponding to the translation. the user programming model can also access the entire floating-point programming model. the eight 80-bit floating-point data registers are analogous to the integer data registers. a 32-bit floating-point control register (fpcr) contains an exception enable byte that enables and disables traps for each class of floating-point exceptions and a mode byte that sets the user-selectable rounding and precision modes. a floating-point status register (fpsr) contains a condition code byte, quotient byte, exception status byte, and accrued exception byte. a floating-point exception handler can use the address in the 32- bit floating-point instruction address register (fpiar) to locate the floating-point instruction that has caused an exception. instructions that do not modify the fpiar can be used to read the fpiar in the exception handler without changing the previous value. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola M68040 user? manual 1- 9 1.7 data format summary the M68040 supports the basic data formats of the m68000 family. some data formats apply only to the iu, some only to the fpu, and some to both. in addition, the instruction set supports operations on other data formats such as memory addresses. the operand data formats supported by the iu are the standard twos-complement data formats defined in the m68000 family architecture plus a new data format (16-byte block) for the move16 instruction. registers, memory, or instructions themselves can contain iu operands. the operand size for each instruction is either explicitly encoded in the instruction or implicitly defined by the instruction operation. whenever an integer is used in a floating-point operation, the fpu automatically converts it to an extended-precision floating-point number before using the integer. the fpu implements single- and double-precision floating-point data formats as defined by the ieee 754 standard. the fpu does not directly support packed decimal real format. however, by trapping as an unimplemented data format instead of as an illegal instruction, software emulation supports the packed decimal format. additionally, each data format has a special encoding that represents one of five data types: normalized numbers, denormalized numbers, zeros, infinities, and not-a-numbers (nans). table 1-1 lists the data formats for both the iu and the fpu. refer to m68000pm/ad, m68000 family programmer? reference manual, for details on data format organization in registers and memory. table 1-1. M68040 data formats operand data format size supported in notes bit 1 bit iu bit field 1?2 bits iu field of consecutive bits binary-coded decimal (bcd) 8 bits iu packed: 2 digits/byte; unpacked: 1 digit/byte byte integer 8 bits iu, fpu word integer 16 bits iu, fpu long-word integer 32 bits iu, fpu quad-word integer 64 bits iu any two data registers 16-byte 128 bits iu memory only, aligned to 16-byte boundary single-precision real 32 bits fpu 1-bit sign, 8-bit exponent, 23-bit fraction double-precision real 64 bits fpu 1-bit sign, 11-bit exponent, 52-bit fraction extended-precision real 80 bits fpu 1-bit sign, 15-bit exponent, 64-bit mantissa 1.8 addressing capabilities summary the M68040 supports the basic addressing modes of the m68000 family. the register indirect addressing modes support postincrement, predecrement, offset, and indexing, which are particularly useful for handling data structures common to sophisticated f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
1- 10 M68040 user? manual motorola applications and high-level languages. the program counter indirect mode also has indexing and offset capabilities. this addressing mode is typically required to support position-independent software. besides these addressing modes, the M68040 provides index sizing and scaling features. an instruction? addressing mode can specify the value of an operand, a register containing the operand, or how to derive the effective address of an operand in memory. each addressing mode has an assembler syntax. some instructions imply the addressing mode for an operand. these instructions include the appropriate fields for operands that use only one addressing mode. table 1-2 lists a summary of the effective addressing modes for the M68040. refer to m68000pm/ad, m68000 family programmer? reference manual, for details on instruction format and addressing modes. table 1-2. effective addressing modes addressing modes syntax register direct data address dn an register indirect address address with postincrement address with predecrement address with displacement (an) (an)+ ?an) (d16,an) address register indirect with index 8-bit displacement base displacement (d 8 ,an,xn) (bd,an,xn) memory indirect postindexed preindexed ([bd,an],xn,od) ([bd,an,xn],od) program counter indirect with displacement (d 16 ,pc) program counter indirect with index 8-bit displacement base displacement (d 8 ,pc,xn) (bd,pc,xn) program counter memory indirect postindexed preindexed ([bd,pc],xn,od) ([bd,pc,xn],od) absolute data addressing short long (xxx).w (xxx).l immediate # f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola M68040 user? manual 1- 11 1.9 notational conventions table 1-3 lists the notation conventions used throughout this manual unless otherwise specified. table 1-3. notational conventions single- and double-operand operations + arithmetic addition or postincrement indicator. arithmetic subtraction or predecrement indicator. arithmetic multiplication. ? arithmetic division or conjunction symbol. ~ invert; operand is logically complemented. l logical and v logical or ? logical exclusive or source operand is moved to destination operand. ? two operands are exchanged. any double-operand operation. tested operand is compared to zero and the condition codes are set appropriately. sign-extended all bits of the upper portion are made equal to the high-order bit of the lower portion. other operations trap equivalent to format ? offset word (ssp); ssp ?2 ssp; pc (ssp); ssp ?4 ssp; sr (ssp); ssp ?2 ssp; (vector) pc stop enter the stopped state, waiting for interrupts. 10 the operand is bcd; operations are performed in decimal. if then else test the condition. if true, the operations after ?hen?are performed. if the condition is false and the optional ?lse?clause is present, the operations after ?lse?are performed. if the condition is false and else is omitted, the instruction performs no operation. refer to the bcc instruction description as an example. register specification an any address register n (example: a3 is address register 3) ax, ay source and destination address registers, respectively. br base register?n, pc, or suppressed. dc data register d7?0, used during compare. dh, dl data registers high- or low-order 32 bits of product. dn any data register n (example: d5 is data register 5) dr, dq data register? remainder or quotient of divide. du data register d7?0, used during update. dx, dy source and destination data registers, respectively. mrn any memory register n. rn any address or data register rx, ry any source and destination registers, respectively. xn index register?n, dn, or suppressed. f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
1- 12 M68040 user? manual motorola table 1-3. notational conventions (continued) data format and type + inf positive infinity operand data format: byte (b), word (w), long (l), single (s), double (d), extended (x), or packed (p). b, w, l specifies a signed integer data type (twos complement) of byte, word, or long word. d double-precision real data format (64 bits). k a twos complement signed integer (?4 to +17) specifying a number? format to be stored in the packed decimal format. p packed bcd real data format (96 bits, 12 bytes). s single-precision real data format (32 bits). x extended-precision real data format (96 bits, 16 bits unused). ?inf negative infinity subfields and qualifiers # or # immediate data following the instruction word(s). ( ) identifies an indirect address in a register. [ ] identifies an indirect address in memory. bd base displacement ccc index into the mc68881/mc68882 constant rom d n displacement value, n bits wide (example: d 16 is a 16-bit displacement). lsb least significant bit lsw least significant word msb most significant bit msw most significant word od outer displacement scale a scale factor (1, 2, 4, or 8, for no-word, word, long-word, or quad-word scaling, respectively). size the index register? size (w for word, l for long word). {offset:width} bit field selection. register names ccr condition code register (lower byte of status register) dfc destination function code register fpcr any floating-point system control register (fpcr, fpsr, or fpiar) fpm, fpn any floating-point data register specified as the source or destination, respectively. ic, dc, ic/dc instruction, data, or both caches mmusr mmu status register pc program counter rc any non floating-point control register sfc source function code register sr status register f r e e s c a l e s e m i c o n d u c t o r , i freescale semiconductor, inc. f o r m o r e i n f o r m a t i o n o n t h i s p r o d u c t , g o t o : w w w . f r e e s c a l e . c o m n c . . .
motorola M68040 user? manual 1- 13 table 1-3. notational conventions (concluded) register codes * general case. c carry bit in ccr cc condition codes from ccr fc function code n negative bit in ccr u undefined, reserved for motorola use. v overflow bit in ccr x extend bit in ccr z zero bit in ccr not affected or applicable. stack pointers isp supervisor/interrupt stack pointer msp supervisor/master stack pointer sp active stack pointer ssp supervisor (master or interrupt) stack pointer usp user stack pointer miscellaneous effective address


▲Up To Search▲   

 
Price & Availability of M68040

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X